<template>
	<view>
		<view class="Mask">

		</view>
		<view class="content">
			<view class="title-box">
				Contact Us
			</view>
			<view class="info-data">
				<view class="Summary">
					<view class="title">
						{{$t('dayareleasei.Briefing')}} <text>*</text>
					</view>
					<view class="input">
						<u--input :placeholder="$t('dayareleasei.enter')" maxlength="30" border="surround"
							v-model="params.Summary">
						</u--input>
						<view class="text">
							{{params.Summary.length}}/30
						</view>
					</view>
				</view>
				<view class="Summary">
					<view class="title">
						{{$t('dayareleasei.Detailst')}} <text>*</text>
					</view>
					<view class="input">
						<u--input :placeholder="$t('dayareleasei.enter')" maxlength="30" border="surround"
							v-model="params.Details">
						</u--input>
						<view class="text">
							{{params.Details.length}}/500
						</view>
					</view>
				</view>
				<view class="Summary">
					<view class="title">
						{{$t('dayareleasei.Name')}} <text>*</text>
					</view>
					<view class="input">
						<u--input :placeholder="$t('dayareleasei.FullName')" border="surround" v-model="params.Name">
						</u--input>
					</view>
				</view>
				<view class="Summary">
					<view class="title">
						{{$t('dayareleasei.Whatsapp')}}
					</view>
					<view class="input">
						<u--input :placeholder="$t('dayareleasei.Optional')" border="surround"
							v-model="params.Whatsapp">
						</u--input>
					</view>
				</view>
				<view class="Summary">
					<view class="title">
						{{$t('dayareleasei.Wechat')}}
					</view>

					<view class="input">
						<u--input :placeholder="$t('dayareleasei.Optional')" border="surround" v-model="params.WeChat">
						</u--input>
					</view>
				</view>
			</view>
			<view class="btn">
				<u-button type="primary" :text="$t('dayareleasei.SUBMIT')" @click="gobay" shape="circle"></u-button>
			</view>
		</view>
		<view class="close">
			<u-icon name="close-circle" color="#ffffff" size="30" @click="gohide"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		name: "contact",
		data() {
			return {
				params: {
					Summary: "",
					Details: "",
					Name: "",
					Whatsapp: "",
					WeChat: ""
				}
			};
		},
		methods: {
			gobay() {
				if (this.params.Summary == '') {
					uni.showToast({
						title: '请填写简报',
						icon: 'none',
					})
					return
				}
				if (this.params.Details == '') {
					uni.showToast({
						title: '请填写详情',
						icon: 'none'
					})
					return
				}
				if (this.params.Name == '') {
					uni.showToast({
						title: '请填写姓名',
						icon: 'none'
					})
					return
				}
				uni.showToast({
					title: '提交成功',
					icon: 'none'
				})
				// const params = {
				// 	map: 'applet_promotional_video',
				// 	title: this.params.Summary,
				// 	info: this.params.Details,
				// 	name: this.params.Name,
				// 	whatsapp: this.params.Whatsapp,
				// 	wx:this.params.WeChat,

				// }
				// this.$Request({
				// 	method: 'GET',
				// 	data: params
				// }).then(res => {
				// 	if (res.data.ec == 200) {

				// 	} else {

				// 	}
				// })
			},
			gohide() {
				this.$emit('hide')
			}
		}
	}
</script>

<style lang="less">
	.Mask {
		position: fixed;
		top: 0;
		width: 100%;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.5);
		z-index: 1200;

	}

	.close {
		position: fixed;
		width: 50rpx;
		left: 0;
		right: 0;
		margin: auto;
		bottom: 15%;
		z-index: 1300;
	}

	.content {
		position: fixed;
		top: 15%;
		left: 0;
		right: 0;
		width: 70%;
		padding: 20rpx 30rpx;
		background-color: #fff;
		border-radius: 10rpx;
		margin: 0 auto;
		z-index: 1300;

		.btn {
			margin-top: 30rpx;
			padding: 0 100rpx;
		}

		.title-box {
			text-align: center;
			font-weight: 600;

		}

		.info-data {
			padding: 10rpx 20rpx;
			margin-top: 10rpx;

			.input {
				margin-top: 10rpx;
				position: relative;

				.text {
					position: absolute;
					top: 20rpx;
					right: 20rpx;
					font-size: 26rpx;
					color: #999;
				}

				.Detailstext {
					position: absolute;
					right: 20rpx;
					font-size: 26rpx;
					color: #999;
					bottom: 20rpx;
				}
			}

			.Summary {
				margin-top: 20rpx;

				.title {
					font-size: 28rpx;

					text {
						color: red;
					}

				}
			}
		}
	}
</style>
